.class Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;
.super Ljava/lang/Object;
.source "FragmentGpsSettings.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;->onStatusChanged(Llt/farmis/libraries/externalgps/providers/Status;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$1:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;

.field final synthetic val$state:Llt/farmis/libraries/externalgps/providers/Status;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;Llt/farmis/libraries/externalgps/providers/Status;)V
    .locals 0

    .line 89
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->this$1:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->val$state:Llt/farmis/libraries/externalgps/providers/Status;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 2

    .line 93
    :try_start_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->val$state:Llt/farmis/libraries/externalgps/providers/Status;

    sget-object v1, Llt/farmis/libraries/externalgps/providers/Status;->CONNECTED:Llt/farmis/libraries/externalgps/providers/Status;

    if-ne v0, v1, :cond_0

    .line 94
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->this$1:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;

    iget-object v0, v0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;->this$0:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;->access$000(Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;)Llt/noframe/gpsfarmguide/widgets/ButtonHelperGps;

    move-result-object v0

    const/4 v1, 0x3

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/widgets/ButtonHelperGps;->setState(I)V

    .line 96
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->val$state:Llt/farmis/libraries/externalgps/providers/Status;

    sget-object v1, Llt/farmis/libraries/externalgps/providers/Status;->CONNECTING_FAILED:Llt/farmis/libraries/externalgps/providers/Status;

    if-eq v0, v1, :cond_1

    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->val$state:Llt/farmis/libraries/externalgps/providers/Status;

    sget-object v1, Llt/farmis/libraries/externalgps/providers/Status;->DISCONNECTED:Llt/farmis/libraries/externalgps/providers/Status;

    if-ne v0, v1, :cond_2

    .line 97
    :cond_1
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->this$1:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;

    iget-object v0, v0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;->this$0:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;->access$000(Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;)Llt/noframe/gpsfarmguide/widgets/ButtonHelperGps;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/widgets/ButtonHelperGps;->setState(I)V

    .line 100
    :cond_2
    sget-object v0, Llt/farmis/libraries/externalgps/ExternalGPS;->Companion:Llt/farmis/libraries/externalgps/ExternalGPS$Companion;

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS$Companion;->getInstance()Llt/farmis/libraries/externalgps/ExternalGPS;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS;->getGpsThread()Llt/farmis/libraries/externalgps/ExternalGPSThread;

    move-result-object v0

    if-eqz v0, :cond_3

    sget-object v0, Llt/farmis/libraries/externalgps/ExternalGPS;->Companion:Llt/farmis/libraries/externalgps/ExternalGPS$Companion;

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS$Companion;->getInstance()Llt/farmis/libraries/externalgps/ExternalGPS;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS;->getGpsThread()Llt/farmis/libraries/externalgps/ExternalGPSThread;

    move-result-object v0

    .line 101
    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPSThread;->getMDeviceProvider()Llt/farmis/libraries/externalgps/providers/NMEADeviceManager;

    move-result-object v0

    instance-of v0, v0, Llt/farmis/libraries/externalgps/providers/usb/NmeaUSBDevice;

    if-eqz v0, :cond_3

    .line 102
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->this$1:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;

    iget-object v0, v0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;->this$0:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;->access$100(Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;)Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    move-result-object v0

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->val$state:Llt/farmis/libraries/externalgps/providers/Status;

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->onStatusChanged(Llt/farmis/libraries/externalgps/providers/Status;)V

    .line 105
    :cond_3
    sget-object v0, Llt/farmis/libraries/externalgps/ExternalGPS;->Companion:Llt/farmis/libraries/externalgps/ExternalGPS$Companion;

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS$Companion;->getInstance()Llt/farmis/libraries/externalgps/ExternalGPS;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS;->getGpsThread()Llt/farmis/libraries/externalgps/ExternalGPSThread;

    move-result-object v0

    if-eqz v0, :cond_4

    sget-object v0, Llt/farmis/libraries/externalgps/ExternalGPS;->Companion:Llt/farmis/libraries/externalgps/ExternalGPS$Companion;

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS$Companion;->getInstance()Llt/farmis/libraries/externalgps/ExternalGPS;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPS;->getGpsThread()Llt/farmis/libraries/externalgps/ExternalGPSThread;

    move-result-object v0

    .line 106
    invoke-virtual {v0}, Llt/farmis/libraries/externalgps/ExternalGPSThread;->getMDeviceProvider()Llt/farmis/libraries/externalgps/providers/NMEADeviceManager;

    move-result-object v0

    instance-of v0, v0, Llt/farmis/libraries/externalgps/providers/bluetooth/NmeaBluetoothDevice;

    if-eqz v0, :cond_4

    .line 107
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->this$1:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;

    iget-object v0, v0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1;->this$0:Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;->access$200(Llt/noframe/gpsfarmguide/views/FragmentGpsSettings;)Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;

    move-result-object v0

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentGpsSettings$1$1;->val$state:Llt/farmis/libraries/externalgps/providers/Status;

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/widgets/gps/GPSStatusView;->onStatusChanged(Llt/farmis/libraries/externalgps/providers/Status;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    :cond_4
    return-void
.end method
